package cn.hdu.community.service;

import cn.hdu.community.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDate;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zhangxin
 * @since 2022-04-01
 */
public interface UserService extends IService<User> {
    /**
     * 查找用户
     *
     * @param userEmail
     * @return
     */
    User findUserByEmail(String userEmail);

    /**
     * 判断用户是否存在
     *
     * @param userEmail
     * @return
     */
    Boolean existsUserByEmail(String userEmail);

    /**
     * 插入用户
     *
     * @param userEmail
     * @param userPassword
     * @return
     */

    Boolean insertUser(String userEmail, String userPassword);

    /**
     * 插入用户最后在线时间
     *
     * @param userActivityTime
     */
    void insertUserActivityTime(Integer userId, LocalDate userActivityTime);
}
